<?php
namespace App\Http\Controllers\Merchant; use App\Library\Response; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; class Log extends Controller { function get(Request $sp13451b) { $spc2138c = $sp13451b->input('user_id'); $sp688d4b = $sp13451b->input('action', \App\Log::ACTION_LOGIN); $sp8e2ceb = \App\Log::where('action', $sp688d4b); $sp8e2ceb->where('user_id', Auth::id()); $speeaf8a = $sp13451b->input('start_at'); if (strlen($speeaf8a)) { $sp8e2ceb->where('created_at', '>=', $speeaf8a . ' 00:00:00'); } $sp5d2c79 = $sp13451b->input('end_at'); if (strlen($sp5d2c79)) { $sp8e2ceb->where('created_at', '<=', $sp5d2c79 . ' 23:59:59'); } $sp26dcb6 = (int) $sp13451b->input('current_page', 1); $sp769c3e = (int) $sp13451b->input('per_page', 20); $spa67529 = $sp8e2ceb->orderBy('created_at', 'DESC')->paginate($sp769c3e, array('*'), 'page', $sp26dcb6); return Response::success($spa67529); } }